<template>
	<view class="completion">
		<!-- <uni-icons type="checkbox-filled" size="100" class="completion-icon" style="color: #F14500;"></uni-icons> -->
		<uni-icons type="checkbox-filled" size="100" class="completion-icon" color="#F14500" v-if="status == 1"></uni-icons>
		<uni-icons type="clear" size="100" class="completion-icon" v-if="status == 2"></uni-icons>
		<text class="completion-title">{{ status == 1 ? '恭喜支付完成' : '支付失败' }}</text>
		<button class="completion-button" @click="ding">返回</button>
	</view>
</template>

<script>
export default {
	data() {
		return {
			status: 0
		}
	},
	onLoad(options) {
		if (options.source) {
			this.status = Number(options.source)
		}
	},
	methods: {
		ding() {
			uni.switchTab({
				url: '/pages/Ordergoods/Ordergoods'
			});
		}
	}
}
</script>

<style lang="less" scoped>
.completion {
	width: 100%;
	height: 1000rpx;
	background-color: #fbfbfb;
	display: flex;
	flex-direction: column;
	text-align: center;
	align-items: center;

	.completion-icon {
		width: 132rpx;
		height: 132rpx;
		position: absolute;
		top: 35rpx;
		left: 282rpx;
	}

	.completion-title {
		display: inline-block;
		// text-align: center;
		width: 242rpx;
		height: 39rpx;
		line-height: 39rpx;
		position: absolute;
		top: 269rpx;
		left: 256rpx;
		font-size: 40rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #121215;
	}

	.completion-button {
		width: 266rpx;
		height: 75rpx;
		position: absolute;
		top: 377rpx;
		left: 245rpx;
		background: linear-gradient(128deg, #F14500 0%, #EF8E64 100%);
		border-radius: 38rpx;
		text-align: center;
		line-height: 75rpx;
		font-size: 26rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #FFFFFF;
	}
}
</style>
